﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbFactory
{
    internal class BaseFactory<T> where T : BaseEntity
    {
        internal static T Save(T entity)
        {
            DbContextProvider.GetContext().Add<T>(entity);
            DbContextProvider.GetContext().SaveChanges();
            return entity;
        }
    }
}
